package com.cqc.recyclyviewitemanimation01.activity;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.cqc.recyclyviewitemanimation01.R;

/**
 * Created by ${cqc} on 2017/9/25.
 */

public class MainActivity extends ListActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(MainActivity.this, R.array.types, android.R.layout.simple_list_item_1);
        setListAdapter(adapter);
    }

    @Override
    protected void onListItemClick(ListView l, View v, int position, long id) {
        super.onListItemClick(l, v, position, id);
        Intent intent = null;
        switch (position) {
            case 0:
                intent = new Intent(MainActivity.this, RecyclerViewLayoutAnimationActivity.class);
                break;
            case 1:
                intent = new Intent(MainActivity.this, RecyclerViewGridLayoutAnimationActivity.class);
                break;
            case 2:
                intent = new Intent(MainActivity.this, RecyclerViewGridLayoutAnimationActivity2.class);

                break;
            case 3:

                break;
        }
        startActivity(intent);
    }
}
